package com.wlhse.service.impl;

import com.wlhse.dao.OversightDao;
import com.wlhse.dto.outDto.HomeSeasonOutDto;
import com.wlhse.service.HomeSeasonService;
import com.wlhse.util.state_code.CodeDict;
import com.wlhse.util.state_code.NR;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Service
public class HomeSeasonServiceImpl implements HomeSeasonService {
    @Resource
    private OversightDao oversightDao;

    @Override
    public String getHomeSeason() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy");
        String currentYear = df.format(new Date());
        return NR.r(oversightDao.queryHomeSeasonOutDto(currentYear), 0, 0);
    }
}
